package com.zlkj.pro.modular.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zlkj.pro.modular.business.entity.*;
import com.zlkj.pro.modular.business.mapper.ReportFlowMapper;
import com.zlkj.pro.modular.business.service.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liyang
 * @date 2024/4/6
 * @time 14:34
 */
@Slf4j
@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = Exception.class)
public class ReportFlowServiceImpl extends ServiceImpl<ReportFlowMapper, ReportFlowEntity> implements ReportFlowService {

    @Override
    public void addFlow(Long reportId, String node, String description, Integer style) {
        ReportFlowEntity reportFlow = new ReportFlowEntity();
        reportFlow.setReportId(reportId);
        reportFlow.setNode(node);
        reportFlow.setDescription(description);
        reportFlow.setStyle(style);
        super.save(reportFlow);

    }
}
